﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Windows.Forms;
using System.IO;
using System.Drawing;
using System.Xml.Serialization;

namespace WOWMultiPlay
{
    public static class Settings
    {
        public static string AppPath = Application.StartupPath;

        public static string SettingsFileName = "Settings.xml";
        public static string SettingsFilePath = Path.Combine(AppPath, SettingsFileName);

        public static string ProfilesFolderName = "Profiles";
        public static string ProfilesFolderPath = Path.Combine(AppPath, ProfilesFolderName);
        public static string ProfilesFileSuffix = "xml";

        public static Color RunningButtonFontColor = Color.Red;
        public static Color NormalButtonFontColor = Color.Transparent;

        // For sharing variables for different forms
        public static bool LoadedInstance = false;
        public static List<IntPtr> Instances = new List<IntPtr>();
        public static bool LoadedProfile = false;
        public static mpProfile Profile;

        // For Serializing
        public static UserSettings UserSettings = new UserSettings();
    }

    [XmlRootAttribute("Settings", IsNullable = false)]
    public class UserSettings
    {
        public double AppOpacity = 100;
        public string ProcessName = "wow";
        public mpTime Interval_KeyPress = new mpTime("50ms");
        public mpTime Interval_KeyDown_Up = new mpTime("20ms");
        public int MaxButtonCountPerLine = 4;
        public int WindowWidth = 300;
        public int WindowHeight = 100;
    }
}